<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>CUDA-URB Documentation: /home/behnam/CUDA-URB/CPU/Single_building.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CUDA-URB Documentation
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">/home/behnam/CUDA-URB/CPU/Single_building.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;fstream&gt;</code><br />
<code>#include &lt;cstdlib&gt;</code><br />
<code>#include &lt;math.h&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &lt;chrono&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for Single_building.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="Single__building_8cpp__incl.png" border="0" usemap="#_2home_2behnam_2CUDA-URB_2CPU_2Single__building_8cpp" alt=""/></div>
<map name="_2home_2behnam_2CUDA-URB_2CPU_2Single__building_8cpp" id="_2home_2behnam_2CUDA-URB_2CPU_2Single__building_8cpp">
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac0f2228420376f4db7e1274f2b41667c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Single__building_8cpp.html#ac0f2228420376f4db7e1274f2b41667c">main</a> (int argc, const char *argv[])</td></tr>
<tr class="separator:ac0f2228420376f4db7e1274f2b41667c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ac0f2228420376f4db7e1274f2b41667c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>argv</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Number of cells in x-dir</p>
<p>Number of cells in y-dir</p>
<p>Number of cells in z-dir</p>
<p>+1 for Staggered grid</p>
<p>+1 for Staggered grid</p>
<p>+2 for staggered grid and ghost cell</p>
<p>Total number of cell-centered values in domain</p>
<p>Total number of face-centered values in domain</p>
<p>Grid resolution</p>
<p>Gaussian precision moduli</p>
<p>Gaussian precision moduli</p>
<p>Error tolerance</p>
<p>Over-relaxation factor</p>
<p>Maximum number of iterations</p>
<p>Declare face-centered positions</p>
<p>Declare coefficients for SOR solver</p>
<p>Declaration of initial wind components (u0,v0,w0)</p>
<blockquote class="doxtable">
<p>Divergence of initial velocity field </p>
</blockquote>
<p>Declaration of final velocity field components (u,v,w)</p>
<p>Declaration of Lagrange multipliers</p>
<p>Location of face centers in x-dir</p>
<p>Location of face centers in y-dir</p>
<p>Location of face centers in z-dir</p>
<p>Surface roughness</p>
<p>Height of the measuring sensor (m)</p>
<p>Measured velocity at the sensor height (m/s)</p>
<p>Building height</p>
<p>Building width</p>
<p>Building length</p>
<p>Building start location in x-direction</p>
<p>Building start location in y-direction</p>
<p>Index of building start location in x-direction</p>
<p>Index of building end location in x-direction</p>
<p>Index of building start location in y-direction</p>
<p>Index of building end location in y-direction</p>
<p>Index of building end location in z-direction</p>
<p>Cell index flag (0 = building, 1 = fluid)</p>
<p>Lineralized index for cell centered values</p>
<p>Assign initial values to the coefficients for SOR solver</p>
<p>Initialize all cells to fluid</p>
<p>Lineralized index for cell faced values</p>
<p>Define logarithmic wind profile</p>
<p>Perpendicular wind direction</p>
<p>Lineralized index for cell centered values</p>
<p>Set cell index flag to building</p>
<p>Lineralized index for cell centered values</p>
<p>Lineralized index for cell centered values</p>
<p>Lineralized index for cell faced values</p>
<p>Set velocity inside the building to zero</p>
<p>Set velocity inside the building to zero</p>
<p>Set velocity inside the building to zero</p>
<p>Lineralized index for cell centered values</p>
<p>Lineralized index for cell faced values</p>
<p>Calculate divergence of initial velocity field</p>
<p>Boundary condition for building edges</p>
<p>Lineralized index for cell centered values</p>
<p>Wall bellow</p>
<p>Wall above</p>
<p>Wall in back</p>
<p>Wall in front</p>
<p>Wall on right</p>
<p>Wall on left</p>
<p>New boundary condition implementation</p>
<p>Lineralized index for cell centered values</p>
<p>Save previous iteration values for error calculation</p>
<p>Lineralized index for cell centered values</p>
<p>Lineralized index for cell centered values</p>
<p>SOR formulation</p>
<p>Mirror boundary condition (lambda (=0) = lambda (=1))</p>
<p>Lineralized index for cell centered values</p>
<p>Reset error value before error calculation</p>
<p>Error calculation</p>
<p>Lineralized index for cell centered values</p>
<p>Lineralized index for cell faced values</p>
<p>Update velocity field using Euler equations</p>
<p>Lineralized index for cell centered values</p>
<p>Lineralized index for cell faced values</p>
<p>Setting velocity field inside the building to zero</p>
<p>Lineralized index for cell centered values</p>
<p>Lineralized index for cell faced values</p>
<p>Declare cell center positions</p>
<p>Location of cell centers in x-dir</p>
<p>Location of cell centers in y-dir</p>
<p>Location of cell centers in z-dir</p>
<p>Declare output velocity field arrays</p>
<p>Lineralized index for cell faced values</p>
<p>Lineralized index for cell centered values</p>
<p>Lineralized index for cell faced values </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
